#ifndef DDOCUMENT_H
#define DDOCUMENT_H

class DClassEntity;

class DDocument : public QObject
{
	Q_OBJECT

public:
	DDocument(QObject *parent = 0);
	~DDocument();

	void addClass(DClassEntity* pClass, DClassEntity* pParent);
	DClassEntity* addClass(ClassType type, const QString& name, Access inheritanceType, DClassEntity* pParent);
	void removeClass(DClassEntity* pClass);
	const QList<DClassEntity*>& classes() const;

	int	maxClassLevel() const;
private:
	QList<DClassEntity*> m_classes;

	void			updateMaxClassLevel();
	// m_nMaxClassLevel - max 'deep' of child classes
	// has value -1 when there are no classes in class list
	int				m_nMaxClassLevel;
signals:
	void classAdded(DClassEntity* pClass);
	void classRemoved(DClassEntity* pClass);
};

#endif // DDOCUMENT_H
